<?php
/**
 * Created by PhpStorm.
 * User: 彭奇
 * Date: 2018/9/27
 * Time: 22:13
 */
$id = $_GET["id"];

try{
    $pdo = new PDO("mysql:dbname=test;host=127.0.0.1","root","");
}catch (PDOException $e){
    echo "连接失败";
    var_dump($e);
}
$delSQL = "DELETE FROM pq_user WHERE id = $id";
$res = $pdo -> exec($delSQL);
if ($res > 0){
    echo "删除成功";
    echo '<meta http-equiv="refresh" content="1;url=check.php">';
}else{
    echo "删除失败";
    var_dump($pdo->errorInfo());
}